<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
          *{
            margin: 0;
            padding: 0;
        }
        html,body{
            height: 100vh;
        }
        .content{
            display: flex;/*默认水平*/
            flex-direction: column;
            height: 100vh;
            background-color: red;
        }
       .box1{
height: 100px;
background-color: green;
        }
        .box2{
           flex: 1; /*主元素，当其他元素占完他们各自的空间，剩余空间box2 全部占满*/
           background-color: yellow;
        }
    </style>
</head>
<body>
      <div class="content">
        <div class="box1"></div>
        <div class="box2"></div>
    </div>
</body>
</html>